import java.util.Scanner;



public class DateTest{

	public static void main(String[] args) {

        //1,提醒用户输入年月日并保存到变量
    	System.out.println("请输入年月日,	中间用空格隔开:");
    	Scanner sc = new Scanner(System.in);
    	int year = sc.nextInt();
    	int month = sc.nextInt();
    	int day = sc.nextInt();
    	
    	//2,判断这一天是一年中的第几天
    	int sum = 0;
    	switch (month - 1) {
    	case 11:
    		sum += 30;
    	case 10:
            sum += 31;
        case 9:
            sum += 30;
        case 8:
            sum += 31;
        case 7:
            sum += 31;
        case 6:
            sum += 30;
        case 5:
            sum += 31;
        case 4:
            sum += 30;
        case 3:
            sum += 31;
        case 2:
            sum += 28;
        case 1:
            sum += 31;
        case 0:
            sum += day;

    	}

    	if (month > 2) {
    		if (year % 4 == 0 && year % 100 != 0 || year % 400 == 0) {
    			sum++;
    		}
    	}
		
		//3,打印结果
        System.out.println(year + "." + month + "." + day + " 是" + year + "年的第" + sum + "天");
	}



}